package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-02
 */
@TableName("bank")
public class Bank extends Model<Bank> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 平台编号
     */
    private String platform;
    /**
     * 姓名
     */
    private String username;
    /**
     * 银行名称
     */
    private String bankName;
    /**
     *  银行类型（1-入款银行，2-出款银行，3-中转银行）
     */
    private Integer banktype;
    /**
     * 银行状态（1-启用状态，2-备用状态，3-冻结状态，4-解冻）
     */
    private Integer status;

    /**
     * 余额
     */
    private Double balance;

    /**
     * 冻结余额
     */
    @TableField(exist = false)
    private Double freezeBalance;

    /**
     * 统计时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date revtime;
    /**
     * 创建时间
     */
    private Date creattime;
    /**
     * 更新时间
     */
    private Date updatetime;

    /**
     * 备注
     * @return
     */

    private String rsemarks;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public Integer getBanktype() {
        return banktype;
    }

    public void setBanktype(Integer banktype) {
        this.banktype = banktype;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public Date getRevtime() {
        return revtime;
    }

    public void setRevtime(Date revtime) {
        this.revtime = revtime;
    }

    public Date getCreattime() {
        return creattime;
    }

    public void setCreattime(Date creattime) {
        this.creattime = creattime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRsemarks() {
        return rsemarks;
    }

    public void setRsemarks(String rsemarks) {
        this.rsemarks = rsemarks;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Bank{" +
        "id=" + id +
        ", platform=" + platform +
        ", username=" + username +
        ", bankName=" + bankName +
        ", banktype=" + banktype +
        ", status=" + status +
        ", balance=" + balance +
        ", revtime=" + revtime +
        ", remarks=" + rsemarks +
        ", creattime=" + creattime +
        ", updatetime=" + updatetime +
        "}";
    }


    public Double getFreezeBalance() {
        return freezeBalance;
    }

    public void setFreezeBalance(Double freezeBalance) {
        this.freezeBalance = freezeBalance;
    }


    public static enum Enum_BankType {
        //银行类型（1-入款银行，2-出款银行，3-中转银行）
        入款银行(1, "入款银行"), 出款银行(2, "出款银行"), 中转银行(3, "中转银行");
        public Integer value;
        public String desc;

        private Enum_BankType(Integer _Value, String _Desc) {
            this.value = _Value;
            this.desc = _Desc;
        }
    }



    public static enum Enum_Status {
        //银行状态（1-启用状态，2-备用状态，3-冻结状态，4-解冻）
        启用状态(1, "启用状态"), 备用状态(2, "备用状态"), 冻结状态(3, "冻结状态"), 解冻(4, "解冻");
        public Integer value;
        public String desc;

        private Enum_Status(Integer _Value, String _Desc) {
            this.value = _Value;
            this.desc = _Desc;
        }
    }
}
